package kuangxiaoyang.hnevc.com.shijiebei;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;

/**
 * Created by Administrator on 2020/12/31.
 */

public class LiBiaoActivity extends AppCompatActivity {

    private TextView textView1;
    private TextView textView2;
    private TextView textView3;
    private TextView textView4;
    private TextView textView5;
    private TextView textView6;
    private TextView textView7;
    private TextView textView8;
    private ImageView imageView;
    private Bundle extras;


    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_libiao);
        extras = getIntent().getExtras();
        initView();
        initData();
        initEvent();
    }

    private void initView() {
        textView1 = (TextView) findViewById(R.id.id_tv);
        textView2 = (TextView) findViewById(R.id.sheng_tv);
        textView3 = (TextView) findViewById(R.id.fu_tv);
        textView4 = (TextView) findViewById(R.id.ping_tv);
        textView5 = (TextView) findViewById(R.id.jinqiu_tv);
        textView6 = (TextView) findViewById(R.id.shiqiu_tv);
        textView7 = (TextView) findViewById(R.id.jifen_tv);
        textView8 = (TextView) findViewById(R.id.detail_tv);
        imageView = (ImageView) findViewById(R.id.url_im);

    }

    private void initData() {

        String id = extras.getString("id");
        String detail = extras.getString("detail");
        String path = extras.getString("path");
        String sheng = String.valueOf(extras.getString("sheng"));
        String fu = String.valueOf(extras.getString("sheng"));
        String ping = String.valueOf(extras.getString("fu"));
        String wingoal = String.valueOf(extras.getString("wingoal"));
        String losegoal = String.valueOf(extras.getString("losegoal"));
        String score = String.valueOf(extras.getString("score"));
        textView1.setText(id);
        textView2.setText(sheng);
        textView3.setText(fu);
        textView4.setText(ping);
        textView5.setText(wingoal);
        textView6.setText(losegoal);
        textView7.setText(score);
        textView8.setText(detail);


        int imgid = LiBiaoActivity.this.getResources().getIdentifier(path, "drawable", getPackageName());

        imageView.setImageResource(imgid);


    }


    private void initEvent() {

    }
}
